import { service } from '@/service'

const baseUrl = '/hbsys-system/organization/admin'

export function associationExport(data) {
  return service.request({
    url: '/hbsys-system/inspectionResults/associationExport',
    method: 'post',
    params: data
  })
}

export function minFeiExport(data) {
  return service.request({
    url: '/hbsys-system/inspectionResults/minFeiExport',
    method: 'post',
    params: data
  })
}

export function getActivityList(data) {
  return service.request({
    url: '/hbsys-system/annualActivity/queryByPage',
    method: 'get',
    params: data
  })
}

//删除活动
export function cancelActivity(id) {
  return service.request({
    url: '/hbsys-system/annualActivity/cancelActivity?id=' + id,
    method: 'put'
  })
}

//删除活动
export function deleteActivity(id) {
  return service.request({
    url: '/hbsys-system/annualActivity/deleteById/' + id,
    method: 'delete'
  })
}

//删除活动报备
export function delActivityReport(id) {
  return service.request({
    url: '/hbsys-system/activityReport/deleteById/' + id,
    method: 'delete'
  })
}
export function addHuoDong(data) {
  return service.request({
    url: '/hbsys-system/annualActivity/add',
    method: 'post',
    data: data
  })
}

export function editActivity(data) {
  return service.request({
    url: '/hbsys-system/annualActivity/edit',
    method: 'put',
    data: data
  })
}

export function activityReport(data) {
  return service.request({
    url: '/hbsys-system/activityReport/add',
    method: 'post',
    data: data
  })
}

export function createQrCodeUrl(id) {
  return service.request({
    url: '/hbsys-system/annualActivity/createQrCodeLijie?id=' + id,
    method: 'get'
  })
}

export function listApprove(data) {
  return service.request({
    url: '/hbsys-system/association/list',
    method: 'get',
    params: data
  })
}

export function getCodeInfo(data) {
  return service.request({
    url: '/hbsys-system/sorg/info/list',
    method: 'post',
    data: data
  })
}

//提交审核
export function postApprove(data) {
  return service.request({
    url: '/hbsys-system/association/approve',
    method: 'post',
    data: data
  })
}

//数据校对
export function dataAssociation(data) {
  return service.request({
    url: '/hbsys-system/association/association',
    method: 'post',
    data: data
  })
}

//年检审核意见
export function approvalList(data) {
  return service.request({
    url: '/hbsys-system/association/approval',
    method: 'post',
    data: data
  })
}

//城运中心上报代办事件回调接口
export function cityBack(data) {
  return service.request({
    url: '/hbsys-system/sorg/info/city/back',
    method: 'get',
    params: data
  })
}

//保存签章信息
export function saveSeal(data) {
  return service.request({
    url: '/hbsys-system/sorg/seal/add',
    method: 'post',
    data: data
  })
}

//保存签章信息
export function updateSeal(data) {
  return service.request({
    url: '/hbsys-system/sorg/seal/edit',
    method: 'put',
    data: data
  })
}

//签章信息查询
export function getSealInfo(data) {
  return service.request({
    url: '/hbsys-system/sorg/seal/list',
    method: 'get',
    params: data
  })
}

export function getSealSignPdf(data) {
  return service.request({
    url: '/hbsys-system/sorg/seal/online',
    method: 'post',
    data: data
  })
}

export function downSealSignPdf(data) {
  return service.request({
    url: '/hbsys-system/sorg/seal/download',
    method: 'post',
    data: data
  })
}

export function downSealSignImage(data) {
  return service.request({
    url: '/hbsys-system/sorg/seal/image',
    method: 'post',
    data: data
  })
}

export function getSealSignList(data) {
  return service.request({
    url: '/hbsys-system/sorg/seal/file/list',
    method: 'get',
    params: data
  })
}

//新增获奖表彰
export function addAward(data) {
  return service.request({
    url: '/hbsys-system/activityRewardInfo/add',
    method: 'post',
    data: data
  })
}

//删除获奖表彰
export function delAward(id) {
  return service.request({
    url: '/hbsys-system/activityRewardInfo/deleteById/' + id,
    method: 'delete'
  })
}

export function editAward(data) {
  return service.request({
    url: '/hbsys-system/activityRewardInfo/edit',
    method: 'put',
    data: data
  })
}

//获奖表彰列表
export function getAwardList(data) {
  return service.request({
    url: '/hbsys-system/activityRewardInfo/queryByPage',
    method: 'get',
    params: data
  })
}

//社会组织等级评估
export function addOrgLevel(data) {
  return service.request({
    url: '/hbsys-system/levelEvaluation/add',
    method: 'post',
    data: data
  })
}

//社会组织等级评估查询
export function getOrgLevelList(data) {
  return service.request({
    url: '/hbsys-system/levelEvaluation/queryByPage',
    method: 'get',
    params: data
  })
}

//社会组织等级修改
export function editOrgLevel(data) {
  return service.request({
    url: '/hbsys-system/levelEvaluation/edit',
    method: 'put',
    data: data
  })
}

//社会组织等级评估删除
export function delOrgLevel(id) {
  return service.request({
    url: '/hbsys-system/levelEvaluation/deleteById/' + id,
    method: 'delete'
  })
}

export const exportYearData = (year) => {
  return service.request({
    url: 'hbsys-system/organization/admin/annual/count/export?examineYear=' + year,
    method: 'get',
    responseType: 'blob'
  })
}
